require "distroid/version"

module Distroid
  # Detects the Linux distrubution the host system runs
  def distro?
    # TODO: this is _very_ rudimentary at the moment, but it works
    # TODO: detect Arch and similar
    return :fedora   if File.exist?("/etc/fedora-release")
    return :redhat   if File.exist?("/etc/redhat-release")
    return :debian   if File.exist?("/etc/debian_version")
    return :suse     if File.exist?("/etc/SUSE-release")
    return :mandrake if File.exist?("/etc/mandrake-release")
  end

  # Detects which operating system the host computer is using
  def os?
    # TODO: implement, possibly using `uname` or similar.  I'd like to avoid
    #       using the sysinfo gem, simply so that there are no deps.
  end
end
